
import CommonJS from '@/views/mixins/common'
import customer from '@/api/crm/customerAPI'
export default{
  data () {
    return {
      customerInfo: {}
    }
  },
  mixins: [CommonJS],
  methods: {
    getRequestType (opt) {
      if (opt === 'customerCreate') {
        return customer.saveCustomerInfoAPI
      } else if (opt === 'customerUpdate') {
        return customer.updateCustomerInfoAPI
      } else if (opt === 'customerDelete') {
        return customer.deleteCustomerInfoAPI
      } else if (opt === 'customerGet') {
        return customer.getCustomerInfoAPI
      } else if (opt === 'customerGetOrder') {
        return customer.getCustomerOrderListAPI
      } else if (opt === 'customerGetContract') {
        return customer.getCustomerContractListAPI
      } else if (opt === 'getCustomerVisitInfoList') {
        return customer.getCustomerVisitInfoListAPI
      } else if (opt === 'saveCustomerVisitInfo') {
        return customer.saveCustomerVisitInfoAPI
      } else if (opt === 'updateCustomerVisitInfo') {
        return customer.updateCustomerVisitInfoAPI
      } else if (opt === 'deleteCustomerVisitInfo') {
        return customer.deleteCustomerVisitInfoAPI
      }
    }
  }
}
